<include file="Public:head" />
<include file="Public:header" />
<include file="Public:left" />
<section id='content'>
<div class='container-fluid'>
<div class='row-fluid' id='content-wrapper'>
<div class='span12'>
<div class='row-fluid'>
    <div class='span12'>
        <div class='page-header'>
            <h1 class='pull-left'>
                <i class='icon-table'></i>
                <span>用户列表</span>
            </h1>
            
        </div>
    </div>
</div>
<div class='row-fluid'>
    <div class='span12 box bordered-box blue-border' style='margin-bottom:0;'>
        <div class='box-header blue-background'>
            <div class='title'>登陆用户</div>
            
        </div>
        <div class='box-content box-no-padding'>
            <div class='responsive-table'>
                <div class='scrollable-area'>
                    <table class='table' style='margin-bottom:0;'>
                        <thead>
                        <tr>
                            <th>
                                用户名
                            </th>
                            <th>
                               身份
                            </th>
                            <th>
                                创建时间
                            </th>
                            <th>最后登录</th>
                            <th></th>
                        </tr>
                        </thead>
                        <tbody>
                            <volist name="list.data" id="vo">
                                <tr>
                                    <td>{$vo.uname}</td>
                                    
                                    <td>
                                        <switch name="vo.group">
                                            <case value="1">
                                                <span class='label label-important'>总管理员</span></case>
                                            <case value="2">
                                                <span class='label label-warning'>员工</span></case>
                                            <default />
                                                <span class='label label-success'>经销商</span>
                                         </switch>
                                    </td>
                                    <td>{$vo.ctime|date="Y-m-d H:i",###}</td>
                                    <td>{$vo.login_time|date="Y-m-d H:i",###}</td>
                                    <td>
                                        <div class='text-right'>
                                            <a class='btn btn-success btn-mini' href='__URL__/edit_user/aid/{$vo.aid}'>
                                                <i class='icon-pencil'></i>
                                            </a>
                                            <a class='btn btn-danger btn-mini'  onclick="del_u({$vo.aid});">
                                                <i class='icon-remove' ></i>
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                                
                            </volist>
                            <script type="text/javascript">
                                function del_u(val){
                                    $.post("__URL__/del_user", { "id": val},
                                       function(data){
                                        if (data.status==1) {
                                          location.replace(location.href);  }
                                       }, "json");
                                            
                                }
                             
                                </script>
                        </tbody>
                    </table>
                    <div>
                            {$list.html}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


</div>
</div>
</div>
</section>
</div>
<include file="Public:bottom" />
<script type="text/javascript">
    $(document).ready(function () {
      $("ul[class='nav nav-stacked']").removeClass('in');
      $("#admin").addClass('in');
      $("li[class='guan']").removeClass('active');
      $("#listuser").addClass('active');
    });
</script>